<?php $this->load->view('layout/header'); ?>
<script src="/static/bk/js/table.js" type="text/javascript"></script>
<div>
</div>

<script type="text/javascript">
    //<![CDATA[
    var theForm = document.forms['form1'];
    if (!theForm) {
        theForm = document.form1;
    }
    function __doPostBack(eventTarget, eventArgument) {
        if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
            theForm.__EVENTTARGET.value = eventTarget;
            theForm.__EVENTARGUMENT.value = eventArgument;
            theForm.submit();
        }
    }
    //]]>
</script>
<div>
</div>
<div id="container">
    <!--查询表单开始-->
    <div id="DivQuery">
        <div id="floatBoxBg" style="filter: alpha(opacity=0); opacity: 0;">
        </div>
        <div id="floatBox" class="floatBox">
            <div id="drag" class="title" onmousedown="DragDialog()">
                <h4>
                    查询</h4>
                <span>关闭</span></div>
            <div class="content">
                <form action="<?php echo b_url('extension/chat')?>" method='post' >
                    <table width="100%" border="0" cellpadding="0" cellspacing="0" class="table_query">
                        <tr class="table_query_row">
                            <td style="width: 15%" align="right">
                                账号类型：
                            </td>
                            <td>
                                <select name="typeid">
                                    <option value="-1">不限</option>
                                    <?php foreach($chat_type as $key=>$val): ?>
                                        <option value="<?php echo $key?>"><?php echo $val?></option>
                                    <?php endforeach; ?>
                                </select>
                            </td>
                            <td style="width: 15%" align="right">
                                昵称
                            </td>
                            <td>
                                <input type="text" name="nickname">
                            </td>
                        </tr>
                        <tr class="table_query_row">
                            <td style="width: 15%" align="right">
                                账号：
                            </td>
                            <td>
                                <input type="text" name="account">
                            </td>
                            <td style="width: 15%" align="right">
                                状态：
                            </td>
                            <td>
                                <span id="radIsClose">
                                    <input id="radIsClose_0" type="radio" name="isclose" value="" checked="checked" /><label for="radIsClose_0">不限</label>
                                    <input id="radIsClose_1" type="radio" name="isclose" value="0" /><label for="radIsClose_1">开放</label>
                                    <input id="radIsClose_2" type="radio" name="isclose" value="1" /><label for="radIsClose_2">关闭</label>
                                </span>
                            </td>
                        </tr>
                        <tr class="table_query_btn">
                            <td align="right" style="width: 15%"></td>
                            <td>
                                <input type="submit" value="查询"  id="" />
                                <input type="button" value="返回" onclick="javascript:HiddenSearchDialog();" />
                            </td>
                            <td align="right" style="width: 15%"></td>
                            <td></td>
                        </tr>
                    </table>
                </form>
            </div>
        </div>
    </div>
    <!--查询表单结束-->
    <!--导航开始-->
    <table width="100%" border="0" cellpadding="0" cellspacing="0" class="table_nav">
        <tr>
            <td>
                账号管理&gt;管理列表
            </td>
        </tr>
    </table>
    <!--导航结束-->
    <!--操作选项开始-->
    <table width="100%" border="0" cellpadding="0" cellspacing="0" class="table_op">
        <tr>
            <td>
                操作选项：
                <a  href="<?php echo b_url('extension/add_chat')?>">添加账号</a>
                <a onclick="javascript:return checkEdit(this);" name="chatid" src="<?php echo b_url('extension/add_chat/').$info['chatid'];?>" id="lbtnEdit" href="javascript:;">修改账号</a>
                <a onclick="javascript:return checkDel(this);" name="chatid" src="<?php echo b_url('extension/delete_info/chat/chatid/chat/');?>" id="lbtnDel" href="javascript:;">删除账号</a>
                <a onclick="javascript:return checkOperate(this);" name="chatid" src="<?php echo b_url('extension/edit_close/chat/chatid/chat/0/')?>" id="lbtnOpen" href="javascript:;">批量开放</a>
                <a onclick="javascript:return checkOperate(this);" name="chatid" src="<?php echo b_url('extension/edit_close/chat/chatid/chat/1/')?>" id="lbtnClose" href="javascript:;">批量关闭</a>
                <?php if($filter == 0){ ?>
                    <a href="javascript:SearchDialog()">查询账号</a>
                <?php }else{ ?>
                    <a href="<?php echo b_url('extension/chat')?>">撤销查询</a>
                <?php } ?>
            </td>
        </tr>
    </table>
    <!--操作选项结束-->
    <!--列表开始-->
    <table width="100%" border="0" cellpadding="0" cellspacing="0" class="table_list" id="TbList">
        <tr class="table_list_title">
            <td style="width: 2%">
                <input type="checkbox" name="checkbox" value="checkbox" onclick="javascript:checkAll(this,'chatid')" />
            </td>
            <td style="width: 10%" onclick="javascript:GoTo('?OrderKey=AdPositionID&AscDesc=desc&txtAdPositionName=&drpTypeID=-1&radIsClose=-1&page=1')" title="点击排序">
                编号
            </td>
            <td style="width: 10%" onclick="javascript:GoTo('?OrderKey=AdPositionName&AscDesc=desc&txtAdPositionName=&drpTypeID=-1&radIsClose=-1&page=1')" title="点击排序">
                昵称
            </td>
            <td style="width: 10%" onclick="javascript:GoTo('?OrderKey=TypeID&AscDesc=desc&txtAdPositionName=&drpTypeID=-1&radIsClose=-1&page=1')" title="点击排序">
                账号
            </td>
            <td style="width: 10%" onclick="javascript:GoTo('?OrderKey=Width&AscDesc=desc&txtAdPositionName=&drpTypeID=-1&radIsClose=-1&page=1')" title="点击排序">
                语言版本
            </td>
            <td style="width: 10%" onclick="javascript:GoTo('?OrderKey=Height&AscDesc=desc&txtAdPositionName=&drpTypeID=-1&radIsClose=-1&page=1')" title="点击排序">
                账号类型
            </td>
            <td style="width: 10%" onclick="javascript:GoTo('?OrderKey=ListID&AscDesc=desc&txtAdPositionName=&drpTypeID=-1&radIsClose=-1&page=1')" title="点击排序">
                排序号
            </td>
            <td style="width: 10%" onclick="javascript:GoTo('?OrderKey=AdminID&AscDesc=desc&txtAdPositionName=&drpTypeID=-1&radIsClose=-1&page=1')" title="点击排序">
                创建人
            </td>
            <td style="width: 10%" onclick="javascript:GoTo('?OrderKey=AddTime&AscDesc=desc&txtAdPositionName=&drpTypeID=-1&radIsClose=-1&page=1')" title="点击排序">
                创建时间
            </td>
            <td style="width: 5%" onclick="javascript:GoTo('?OrderKey=IsClose&AscDesc=desc&txtAdPositionName=&drpTypeID=-1&radIsClose=-1&page=1')" title="点击排序">
                状态
            </td>
        </tr>
        <?php foreach($list as $k=>$v): ?>
            <tr class="table_list_row_normal">
                <td style="width: 2%">
                    <input name="chatid" type="checkbox" id="chatid" value="<?php echo $v['chatid']?>" onclick="javascript:TrColor2('chatid',1)" />
                </td>
                <td style="width: 10%" onclick="javascript:TrColor('chatid',1)">
                    <?php echo $v['chatid']?>
                </td>
                <td style="width: 10%" onclick="javascript:TrColor('chatid',1)">
                    <a href="<?php echo b_url('extension/add_chat/').$v['chatid'];?>">
                        <?php echo $v['nickname']?>
                    </a>
                </td>
                <td style="width: 10%" onclick="javascript:TrColor('AdPositionID',1)">
                    <?php echo $v['account']?>
                </td>
                <td style="width: 10%" onclick="javascript:TrColor('AdPositionID',1)">
                    <?php echo $v['languagever']?>
                </td>
                <td style="width: 10%" onclick="javascript:TrColor('AdPositionID',1)">
                    <?php
                        foreach($chat_type as $key=>$val){
                            if($key == $v['typeid']){
                                echo $val;
                            }
                        }
                    ?>
                </td>
                <td style="width: 10%" onclick="javascript:TrColor('AdPositionID',1)">
                    <?php echo $v['listid']?>
                </td>
                <td style="width: 10%" onclick="javascript:TrColor('AdPositionID',1)">
                    <?php echo $v['adminname']?>
                </td>
                <td style="width: 10%" onclick="javascript:TrColor('AdPositionID',1)">
                    <?php echo $v['addtime'];?>
                </td>
                <td style="width: 5%" onclick="javascript:TrColor('AdPositionID',1)">
                    <?php
                    if($v['isclose'] == 0){
                        echo '开放';
                    }elseif($v['isclose'] == 1){
                        echo '<font color="red">关闭</font>';
                    }
                    ?>
                </td>
            </tr>
        <?php endforeach; ?>
    </table>
    <!--列表结束-->
    <!--分页开始-->
    <?php $pagination->show();?>
    <!--分页结束-->
</div>
<?php $this->load->view('layout/footer'); ?>

